<nav class="navbar-default navbar-static-side" role="navigation">
    <div class="nav-close"><i class="fa fa-times-circle"></i>
    </div>
    <div class="sidebar-collapse">
        <ul class="nav" id="side-menu">
            <li class="nav-header">
                <div class="dropdown profile-element" style="text-align: center;">
                    <span><img alt="image" class="img-circle" 
                              @if(isEmpty(avatar)){
                                    src="${ctxPath}/static/img/logos.png"
                               @}else{
                                    src="${ctxPath}/kaptcha/${avatar}"
                               @} 
                               width="45px"/></span>
                    <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                        <span class="clear">
                       <span class="block m-t-xs"><strong class="font-bold">管理员</strong></span>
                        <span class="text-muted text-xs block">${userName}<b class="caret"></b></span>
                        </span>
                    </a>
                     <ul class="dropdown-menu animated fadeInRight m-t-xs">
                        <li><a class="J_menuItem" href="${ctxPath}/sys/sysUser/user_info">个人资料</a></li>
                        <li><a class="J_menuItem" href="${ctxPath}/sys/sysUser/user_chpwd">修改密码</a></li>
                        <li class="divider"></li>
                        <li><a href="${ctxPath}/login/logout">安全退出</a>
                        </li>
                    </ul>
                </div>
                <div class="logo-element">Mx
                </div>
            </li>
            
           @for(title in titles){
                @if(tool.isEmpty(title.children)){
                    <li>
                        <a class="J_menuItem" href="${ctxPath}${title.url}">
                            <i class="fa ${title.icon}"></i>
                            <span class="nav-label">${title.name}</span>
                        </a>
                    </li>
                @}else{
                    <li>
                        <a href="#">
                            <i class="fa ${title.icon}"></i>
                            <span class="nav-label">${title.name}</span>
                            <span class="fa arrow"></span>
                        </a>
                        <ul class="nav nav-second-level">
                            @for(subTitle in title.children){
                            <li>
                                <a class="J_menuItem" href="${ctxPath}${subTitle.url}">${subTitle.name}</a>
                            </li>
                            @}
                        </ul>
                    </li>
                @}
            @}
        </ul>
    </div>
</nav>